<template>
  <div class="row-bar">

    <!-- 顶部标题 -->
    <div
        style="cursor: pointer; font-size: 22px; color: rgb(255, 255, 255); line-height: 64px; font-weight: 300; background-color: rgb(30, 136, 229); padding-left: 40px; height: 56px;">
      电商App
    </div>

    <!--  管理员图像  -->
    <div
        style="padding: 15px 0px 20px 15px; background-image: url(https://oss.gaojie.cc/mallmaterial_bg.png); height: 45px">
      <img class="user-photo" size="50" src="https://oss.gaojie.cc/mmToNEqrEj.png">
      <span
          style="padding-top: 12px; display: block; color: white; font-weight: 300; text-shadow: rgb(68, 68, 68) 1px 1px;">管理员
      </span>
    </div>

    <!--  四个选项卡 -->
    <div>

      <!--  首页 -->
      <div>
        <a @click="showChartBox" tabindex="0" type="button">
          <div>
            <span style="height: 100%; width: 100%; position: absolute; top: 0px; left: 0px; overflow: hidden;">
            </span>
            <div class="svg-box-div">
              <svg viewBox="0 0 24 24" class="svg-viewBox">
                <path
                    d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9 17H7v-7h2v7zm4 0h-2V7h2v10zm4 0h-2v-4h2v4z">
                </path>
              </svg>
              <div>首页</div>
            </div>
          </div>
        </a>
      </div>

      <!--  商品管理 -->
      <div>
        <a @click="showGoodsManageBox" tabindex="0" type="button">
          <div>
            <div class="svg-box-div">
              <svg viewBox="0 0 24 24" class="svg-viewBox">
                <path
                    d="M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-5 14H4v-4h11v4zm0-5H4V9h11v4zm5 5h-4V9h4v9z">
                </path>
              </svg>
              <div>商品管理</div>
            </div>
          </div>
        </a>
      </div>

      <!-- 订单管理 -->
      <div>
        <a tabindex="0" type="button">
          <div>
            <div class="svg-box-div">
              <svg viewBox="0 0 24 24" class="svg-viewBox">
                <path
                    d="M20 2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM8 20H4v-4h4v4zm0-6H4v-4h4v4zm0-6H4V4h4v4zm6 12h-4v-4h4v4zm0-6h-4v-4h4v4zm0-6h-4V4h4v4zm6 12h-4v-4h4v4zm0-6h-4v-4h4v4zm0-6h-4V4h4v4z">
                </path>
              </svg>
              <div>订单管理</div>
            </div>
          </div>
        </a>
      </div>

      <!-- 财务管理 -->
      <div>
        <a tabindex="0" type="button">
          <div>
            <div class="svg-box-div">
              <svg viewBox="0 0 24 24" class="svg-viewBox">
                <path
                    d="M12 5.9c1.16 0 2.1.94 2.1 2.1s-.94 2.1-2.1 2.1S9.9 9.16 9.9 8s.94-2.1 2.1-2.1m0 9c2.97 0 6.1 1.46 6.1 2.1v1.1H5.9V17c0-.64 3.13-2.1 6.1-2.1M12 4C9.79 4 8 5.79 8 8s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm0 9c-2.67 0-8 1.34-8 4v3h16v-3c0-2.66-5.33-4-8-4z">
                </path>
              </svg>
              <div>财务管理</div>
            </div>
          </div>
        </a>
      </div>

    </div>

  </div>
</template>

<script>
module.exports = {
  methods: {
    showChartBox() {
      this.$emit("show-chart-box", 1)
    },
    showGoodsManageBox() {
      this.$emit("show-goodsmanage-box", 2)
    }
  }
}

</script>

<style>
a {
  border: 10px;
  box-sizing: border-box;
  display: block;
  font-family: Roboto, sans-serif;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  cursor: pointer;
  text-decoration: none;
  margin: 0px;
  padding: 0px;
  outline: none;
  font-size: 20px;
  font-weight: inherit;
  transform: translate(0px, 0px);
  color: rgb(255, 255, 255);
  line-height: 50px;
  position: relative;
  transition: all 450ms cubic-bezier(0.23, 1, 0.32, 1) 0ms;
  white-space: nowrap;
  background: none;
}

a:hover {
  color: #1e88e5;
  text-decoration: none
}

.user-photo {
  color: rgb(255, 255, 255);
  background-color: rgb(188, 188, 188);
  user-select: none;
  display: block;
  align-items: center;
  justify-content: center;
  font-size: 25px;
  border-radius: 50%;
  height: 50px;
  width: 50px;
  float: left;
  margin-right: 15px;
  box-shadow: rgba(0, 0, 0, 0.2) 0px 0px 0px 8px;
}

.row-bar {
  color: rgba(0, 0, 0, 0.87);
  background-color: rgb(33, 33, 33);
  transition: transform 450ms cubic-bezier(0.23, 1, 0.32, 1) 0ms;
  box-sizing: border-box;
  font-family: Roboto, sans-serif;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  box-shadow: rgba(0, 0, 0, 0.16) 0px 3px 10px, rgba(0, 0, 0, 0.23) 0px 3px 10px;
  border-radius: 0px;
  height: 100%;
  width: 230px;
  position: fixed;
  z-index: 1300;
  left: 0px;
  top: 0px;
  transform: translate(0px, 0px);
  overflow: auto;
}

.svg-box-div {
  margin-left: 0px;
  padding: 0px 16px 0px 72px;
  position: relative;
}

.svg-viewBox {
  display: block;
  color: rgba(0, 0, 0, 0.87);
  fill: rgb(117, 117, 117);
  height: 40px;
  width: 30px;
  user-select: none;
  transition: all 450ms cubic-bezier(0.23, 1, 0.32, 1) 0ms;
  position: absolute;
  top: 0px;
  margin: 6px;
  left: 7px;
}
</style>